import { AudioSynthesisService } from "@/module/audio-synthesis/audio-synthesis.service";

export enum BizFailedCodeEnum {
  ADMIN_USERNAME_PASSWORD_WRONG = 10000,
  ADMIN_DISABLED,
  ADMIN_USERNAME_EXISTS,
  ADMIN_PASSWORD_WRONG,
  CATEGORY_EXISTS = 20000,
  CATEGORY_USED_BY_ARTICLE,
  WX_LOGIN_FAILED=30000,
  VCODE_WRONG=40000,
  VCODE_SEND_FREQUENCY,
  VCODE_SEND_ERROR,
  VCODE_SEND_ERROR_MAYBE_YIDONG,
  USER_MOBILE_EXISTS = 50000,
  USER_NAME_EXISTS,
  USER_DISABLED,
  USER_PASSWORD_WRONG,
  USER_LOGIN_WRONG,
  USER_MOBILE_NOT_EXISTS,
  USER_LOGIN_EXPIRED,
  BRAND_USED_BY_EVALUATION = 60000,
  ROLE_USED = 70000,
  ROLE_EXISTS,
  ARTICLE_NOT_EXISTS=80000,
  EVALUATION_DATA_NOT_SAME_TYPE=90000,
  EVALUATION_DATA_LIST_NOT_ALL_HAS_FREQ,
  EVALUATION_COMPOSE_NOT_EXISTS=100000,
  EVALUATION_NOT_EXISTS=110000,
  EVALUATION_IMPULSERESPONSE_FILE_NOT_EXISTS,
  EVALUATION_THD_DATA_NOT_EXISTS,
  EVALUATION_FREQ_DBA_DATA_NOT_EXISTS,
  FILE_DOWNLOAD_ERROR=120000,
  AUDIO_SYNTHESIS_OVER_USER_COUNT=130000,
  EQ_NOT_EXISTS=140000,
}
export const bizFailedDesc: BizFailedCodeType = {
  [BizFailedCodeEnum.ADMIN_USERNAME_PASSWORD_WRONG]: '管理员用户名或密码错误',
  [BizFailedCodeEnum.ADMIN_DISABLED]: '该管理员已被禁用',
  [BizFailedCodeEnum.ADMIN_USERNAME_EXISTS]: '该账户名已存在',
  [BizFailedCodeEnum.ADMIN_PASSWORD_WRONG]: '密码错误',
  [BizFailedCodeEnum.CATEGORY_EXISTS]: '分类名称已存在',
  [BizFailedCodeEnum.CATEGORY_USED_BY_ARTICLE]: '该分类已被文章使用',
  [BizFailedCodeEnum.WX_LOGIN_FAILED]: '微信登录失败',
  [BizFailedCodeEnum.VCODE_WRONG]: '验证码错误',
  [BizFailedCodeEnum.VCODE_SEND_FREQUENCY]: '验证码发送频繁',
  [BizFailedCodeEnum.VCODE_SEND_ERROR]: '验证码发送失败，请稍后重试',
  [BizFailedCodeEnum.VCODE_SEND_ERROR_MAYBE_YIDONG]: '验证码发送失败，请稍后重试。您的手机可能为移动手机号，存在验证码发送失败的情况，敬请谅解',
  [BizFailedCodeEnum.USER_MOBILE_EXISTS]: '用户手机号已存在',
  [BizFailedCodeEnum.USER_NAME_EXISTS]: '用户昵称已存在',
  [BizFailedCodeEnum.USER_DISABLED]: '用户被禁用，请联系管理员',
  [BizFailedCodeEnum.USER_PASSWORD_WRONG]: '用户当前密码错误',
  [BizFailedCodeEnum.USER_LOGIN_WRONG]: '手机号或密码错误',
  [BizFailedCodeEnum.USER_MOBILE_NOT_EXISTS]: '用户手机号不存在',
  [BizFailedCodeEnum.USER_LOGIN_EXPIRED]: '用户登录已过期',
  [BizFailedCodeEnum.BRAND_USED_BY_EVALUATION]: '该品牌已被评测使用',
  [BizFailedCodeEnum.ROLE_USED]: '该角色已被使用',
  [BizFailedCodeEnum.ROLE_EXISTS]: '该角色已存在',
  [BizFailedCodeEnum.ARTICLE_NOT_EXISTS]: '该文章不存在',
  [BizFailedCodeEnum.EVALUATION_DATA_NOT_SAME_TYPE]: '数据不为同一测试项',
  [BizFailedCodeEnum.EVALUATION_DATA_LIST_NOT_ALL_HAS_FREQ]: '列表中存在没有频响数据',
  [BizFailedCodeEnum.EVALUATION_COMPOSE_NOT_EXISTS]: 'HiFi系统不存在',
  [BizFailedCodeEnum.EVALUATION_NOT_EXISTS]: '评测数据不存在',
  [BizFailedCodeEnum.EVALUATION_IMPULSERESPONSE_FILE_NOT_EXISTS]: '评测数据的冲击文件不存在',
  [BizFailedCodeEnum.EVALUATION_THD_DATA_NOT_EXISTS]: '评测数据的THD数据不存在',
  [BizFailedCodeEnum.EVALUATION_FREQ_DBA_DATA_NOT_EXISTS]: '评测数据的频响数据不存在',
  [BizFailedCodeEnum.FILE_DOWNLOAD_ERROR]: '从OSS文件下载失败',
  [BizFailedCodeEnum.AUDIO_SYNTHESIS_OVER_USER_COUNT]: '已超过您的当天可用生成数量',
  [BizFailedCodeEnum.EQ_NOT_EXISTS]: '该调音不存在',
};

type BizFailedCodeType = {
  [propName in BizFailedCodeEnum]: string;
};
